/**
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
*/
import request from '@/utils/request';

// 模型庫類型統計
export function getModelAllByEnumType(enumType){
  return request({
    url: `/model/list/count/${enumType}`,
    method: 'get',
  });
}

// 模型库时间统计
export function getModelTimeStatistics(field=undefined, startTime, endTime){
  return request({
    url: field 
      ? `/model/list/time/count?startTime=${startTime}&endTime=${endTime}&field=${field}` 
      :`/model/list/time/count?startTime=${startTime}&endTime=${endTime}`,
    method: 'get',
  }); 
}

// 算例库时间统计
export function getCaseTimeStatistics(field, startTime, endTime){
  return request({
    url: `/calculationExample/list/time/count?startTime=${startTime}&endTime=${endTime}&field=${field}`,
    method: 'get',
  }); 
} 

// 算例库参数统计
export function getCaseParamStatistics(originalName){
  return request({
    url: `/calculationExample/list/count/${originalName}`,
    method: 'get',
  });   
} 

// 铺层统计
export function getLayupStatistics(startTime, endTime){
  return request({    
    url: `/isfd/dataAnalysis/layup/count?startTime=${startTime}&endTime=${endTime}`,
    method: 'get',
  }); 
} 

// 型材库时间统计
export function getMaterialTimeStatistics(field, startTime, endTime){
  return request({

    url: `/isfd/section/list/time/count?startTime=${startTime}&endTime=${endTime}&field=${field}&type=ALL`,
    method: 'get',
  }); 
} 

// 型材库参数统计
export function getMaterialParamStatistics(){
  return request({
    url: `/isfd/section/list/count/type?type=ALL`,                          
    method: 'get',
  });             
}     

// 算法库时间统计
export function getAlgorithmTimeStatistics(field, startTime, endTime){          
  return request({
    url: `/analysis/list/time/count?startTime=${startTime}&endTime=${endTime}&field=${field}`,
    method: 'get',
  });   
}

// 紧固件库参数统计
export function getFixationParamStatistics(){          
  return request({
    url: `/fastener/list/count/material`,
    method: 'get',
  });          
}   

// 总数统计
export function getTotalCountStatistics(startTime, endTime){          
  return request({
    url: `/isfd/dataAnalysis/all/count?startTime=${startTime}&endTime=${endTime}`,
    method: 'get',
  });          
}           